<?php

class FP_Controller_Plugin_ErrorHandler extends Zend_Controller_Plugin_ErrorHandler {

  public function routeStartup(Zend_Controller_Request_Abstract $request){
    Zend_Controller_Front::getInstance()->unregisterPlugin('Zend_Controller_Plugin_ErrorHandler');
  }

  public function preDispatch(Zend_Controller_Request_Abstract $request){
   if ($request->getControllerName() != 'error')
    return $this->postDispatch($request);
  }

  public function postDispatch(Zend_Controller_Request_Abstract $request)
  {
    if ($request->getControllerName() != 'error')
      return parent::postDispatch($request);

  }

}

?>